<!DOCTYPE html>
<html lang="zh-cn" >
  <head>
	<meta name="generator" content="Hugo 0.96.0" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta
      name="author"
      content="awesome404"
    />
      
    <title>
      鹊木笔记 ｜ 前端菜鸡的自我修养
    </title>
    
    
    
    <meta
      name="description"
      content="一名前端程序员的博客!!!"
    />
      
    <meta
      name="keywords"
      content="Blog, 程序员, 前端"
    />
      
    <link rel="alternate" type="application/rss+xml" href="https://awesome404.gitee.io/index.xml" title="鹊木笔记" />
      <link
    rel="shortcut icon" href="https://awesome404.gitee.io/images/favicon.ico" />

    <link
      rel="stylesheet"
      type="text/css"
      media="screen"
      href="https://awesome404.gitee.io/css/normalize.css"
    />
    <link
      rel="stylesheet"
      type="text/css"
      media="screen"
      href="https://cdn.jsdelivr.net/npm/animate.css@4.1.0/animate.min.css"
    />
    <link rel="stylesheet" type="text/css" media="screen" href="https://awesome404.gitee.io/css/zozo.css" />
    <link
      rel="stylesheet"
      type="text/css"
      media="screen"
      href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css"
    />
    <link rel="stylesheet" type="text/css" media="screen" href="https://awesome404.gitee.io/css/highlight.css" />

    
    
  </head>
</html>


<body>
    <div class="main animate__animated animate__fadeInDown">
        
<div class="nav_container animated fadeInDown">
  <div class="site_nav" id="site_nav">
    <ul>
      
      <li>
        <a href="/">首页</a>
      </li>
      
      <li>
        <a href="/posts/">归档</a>
      </li>
      
      <li>
        <a href="/tags/">标签</a>
      </li>
      
      <li>
        <a href="/about/">关于</a>
      </li>
      
    </ul>
  </div>
  <div class="menu_icon">
    <a id="menu_icon">
      <i class="ri-settings-line"></i>
    </a>
  </div>
</div>

        <div class="header animated fadeInDown">
  <div class="site_title_container">
    <div class="site_title">
      <h1>
        <a href="https://awesome404.gitee.io">
          <span>鹊木笔记</span>
        </a>
      </h1>
    </div>
    <div class="description">
      <p class="sub_title">
        前端菜鸡的自我修养
      </p>
      <div class="my_socials">
         
        <a href="https://github.com/404Awesome" title="github" target="_blank"
          ><i class="ri-github-fill"></i
        ></a>
         
        <a
          href="https://awesome404.gitee.io/index.xml"
          type="application/rss+xml"
          title="rss"
          target="_blank"
          ><i class="ri-rss-fill"></i
        ></a>
      </div>
    </div>
  </div>
</div>

        <div class="content">
            

<div class="post animated fadeInDown">
    <div class="post_title">
        <h2><a href='/posts/vite%E6%89%93%E5%8C%85cdn/'>Vite打包CDN</a></h2>
    </div>
    
    <div class="list">
        <div class="post_content markdown">
            <p>安装NPM包 npm i rollup-plugin-external-globals -D npm i rollup-plugin-commonjs -D 配置Vite 安装好上面两个包后, 按照下面格式进行配置CDN build: { rollupOptions: { external: [&#39;vue&#39;, &#39;vue-router&#39;, &#39;element-plus&#39;, &#39;pinia&#39;, &#39;vue-demi&#39;], plugins: [ commonjs(), externalGlobals({ vue: &#39;Vue&#39;, &#39;pinia&#39;: &#34;Pinia&#34;, &#39;vue-demi&#39;: &#39;VueDemi&#39;, &#39;vue-router&#39;: &#39;VueRouter&#39;, &#39;element-plus&#39;: &#39;ElementPlus&#39;, }), ] } } 配置Index.html 将准备好的 cdn 链接引入index.h......</p>
        </div>
    </div>
    
    <div class="post_footer">
        <div class="meta">
            <div class="info">
                <span class="field">
                    <i class="ri-time-line"></i>
                    <span class="date">2022.06.21</span>
                </span>
                
                <span class="field tags">
                    <i class="ri-price-tag-2-line"></i>
                    
                    <a href="https://awesome404.gitee.io/tags/vite/">Vite</a>
                    
                    <a href="https://awesome404.gitee.io/tags/cdn/">CDN</a>
                    
                </span>
                
            </div>
        </div>
    </div>
</div>

<div class="post animated fadeInDown">
    <div class="post_title">
        <h2><a href='/posts/uni-app%E5%BC%95%E5%85%A5%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87/'>UniApp引入字体图标</a></h2>
    </div>
    
    <div class="list">
        <div class="post_content markdown">
            <p>前言 UniApp 支持 base64 格式字体图标 所以想使用字体图标, 需要使用转换工具进行转换 下载字体图标文件 这里以 remixicon 为例 通过 npm下载到本地, 字体图标目录结构如下, 这里只用到 ttf 文件 使用工具进行转换 这里用到的转换工具是在线网站......</p>
        </div>
    </div>
    
    <div class="post_footer">
        <div class="meta">
            <div class="info">
                <span class="field">
                    <i class="ri-time-line"></i>
                    <span class="date">2022.04.10</span>
                </span>
                
                <span class="field tags">
                    <i class="ri-price-tag-2-line"></i>
                    
                    <a href="https://awesome404.gitee.io/tags/uniapp/">UniApp</a>
                    
                </span>
                
            </div>
        </div>
    </div>
</div>

<div class="post animated fadeInDown">
    <div class="post_title">
        <h2><a href='/posts/docker%E4%B8%8Emongodb/'>Docker与Mongodb</a></h2>
    </div>
    
    <div class="list">
        <div class="post_content markdown">
            <p>手动方式 1. 准备 先使用 docker 命令拉取最新的 mongo 镜像 docker pull mongo:latest 2. 启动容器 方式一 使用以下命令，在启动容器的时候，配置数据库管理员账户，开启用户验证 docker run --name db -d -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=123456 mongo 以上的用户名为 admin，密码为 123456，......</p>
        </div>
    </div>
    
    <div class="post_footer">
        <div class="meta">
            <div class="info">
                <span class="field">
                    <i class="ri-time-line"></i>
                    <span class="date">2022.03.24</span>
                </span>
                
                <span class="field tags">
                    <i class="ri-price-tag-2-line"></i>
                    
                    <a href="https://awesome404.gitee.io/tags/docker/">Docker</a>
                    
                    <a href="https://awesome404.gitee.io/tags/mongodb/">Mongodb</a>
                    
                    <a href="https://awesome404.gitee.io/tags/node/">Node</a>
                    
                </span>
                
            </div>
        </div>
    </div>
</div>

<div class="post animated fadeInDown">
    <div class="post_title">
        <h2><a href='/posts/expresssession%E6%8C%81%E4%B9%85%E5%8C%96/'>ExpressSession数据持久化</a></h2>
    </div>
    
    <div class="list">
        <div class="post_content markdown">
            <p>准备 确保本地已开启 MongoDB 服务 安装模块 需安装以下模块 npm i connect-mongo -S npm i express-session -S 使用案例 let session = require(&#34;express-session&#34;) let MongoStore = require(&#34;connect-mongo&#34;) module.exports = (app) =&gt; { app.use(session({ secret: &#34;NaNaNa&#34;, resave: false, cookie: { maxAge: 8000 }, saveUninitialized: true, store: MongoStore.create({ mongoUrl: &#34;mongodb://localhost:27017/session&#34; }) })) } 注意 app 为 express 的实例 Cookie.maxAge 需要大于 6000......</p>
        </div>
    </div>
    
    <div class="post_footer">
        <div class="meta">
            <div class="info">
                <span class="field">
                    <i class="ri-time-line"></i>
                    <span class="date">2022.03.15</span>
                </span>
                
                <span class="field tags">
                    <i class="ri-price-tag-2-line"></i>
                    
                    <a href="https://awesome404.gitee.io/tags/express/">Express</a>
                    
                    <a href="https://awesome404.gitee.io/tags/session/">Session</a>
                    
                    <a href="https://awesome404.gitee.io/tags/mongodb/">MongoDB</a>
                    
                </span>
                
            </div>
        </div>
    </div>
</div>


<div class="pagination">
    
    
    
    <a href="/page/2/" class="next">
        
        更多
    </a>
    
    
</div>
        </div>
    </div>
    
<style>
  #hitokoto {
    overflow: hidden;
    margin: 0 auto;
    width: 80%;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    color: #424242;
  }

  .footer {
    padding: 30px 0px;
  }
</style>

<footer class="footer">
  <p id="hitokoto">:D 获取中...</p>
</footer>

<script>
  fetch("https://v1.hitokoto.cn")
    .then((response) => response.json())
    .then((data) => {
      const hitokoto = document.getElementById("hitokoto");
      hitokoto.href = "https://hitokoto.cn/?uuid=" + data.uuid;
      hitokoto.innerText = data.hitokoto;
    })
    .catch((err) => err);
</script>

    <script src="https://awesome404.gitee.io/js/jquery-3.5.1.min.js"></script>
<link href="https://awesome404.gitee.io/css/fancybox.min.css" rel="stylesheet">
<script src="https://awesome404.gitee.io/js/fancybox.min.js"></script>
<script src="https://awesome404.gitee.io/js/zozo.js"></script>




</body>

</html>